#coding=utf-8
from data.dataUtil import DataUtil
from wallet import Wallet
from data.chainData import Block
from datetime import datetime

class Security(object):

    def __init__(self):
        print ""
        self.data = DataUtil()
        self.private_key = self.data.config['private']
        self.public_key = self.data.config['public']
        if not self.private_key or len(self.private_key) == 0:
            coin_wallet = Wallet()
            self.private_key, self.public_key = coin_wallet.generate_ECDSA_keys()
            self.data.update_config('private',self.private_key)
            self.data.update_config('public', self.public_key)
if __name__ == '__main__':
    security = Security()
    # block = Block(1, datetime.utcnow(),"Hello world","nonono")
    # block.mine_block()
    input("Press any key to exit...")